package com.seesman.application.maintenance.common.gui.utilities;

import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.ImageIcon;

public class FrameUtil {

	public ImageIcon readImageIcon(String filename) {		

		String str = getClass().getResource("/").toString();
		str = str.substring(0,str.length()-4);
		URL url = null;
		try {
			url = new URL(str.concat("icon-image/") + filename);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}        
        return new ImageIcon(url);
    }
	
}
